$(function () {
    var basePath = "/wood";
    $("#login").submit(function (event) {
        event.preventDefault();
        $.ajax({
            url: basePath+"/user/login",
            type: "POST",
            data: $(this).serialize(),
            success: function (data) {

                if (data == 1) {
                    window.location.href = basePath + "/home";

                } else if (data == 0) {
                    $("#loginHint").html("<b>用户名或者密码错误!</b>");
                }
            }
        });

    });

});